<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>最高位</title>
    <script>
        let a=prompt("请输入一个数");

        while(parseInt(a/10)!=0){
           a=parseInt(a/10);
        }
        document.write(a);
    </script>
</head>
<body>

</body>
</html>